package modellayer;

/**
 * The Class BusinessCustomer.
 *@author Benjamin Ørskov
 *@author Lasse Lambertsen
 *@author Ole Kirk
 *@author Søren Søgaard
 */
public class BusinessCustomer extends Customer {

	/** The cvr. */
	private String cvr;

	/** The discount. */
	private Double discount;

	/**
	 * Instantiates a new business customer.
	 *
	 * @param name
	 *            the name
	 * @param address
	 *            the address
	 * @param city
	 *            the city
	 * @param email
	 *            the email
	 * @param phone
	 *            the phone
	 * @param cvr
	 *            the cvr
	 * @param discount
	 *            the discount
	 */
	public BusinessCustomer(String name, String address, String city,
			String email, String phone, String cvr, Double discount) {
		super(name, address, city, email, phone);
		this.cvr = cvr;
		this.discount = discount;
	}

	/**
	 * Gets the cvr.
	 *
	 * @return the cvr
	 */
	public String getCvr() {
		return cvr;
	}

	/**
	 * Sets the cvr.
	 *
	 * @param cvr
	 *            the new cvr
	 */
	public void setCvr(String cvr) {
		this.cvr = cvr;
	}

	/**
	 * Gets the discount.
	 *
	 * @return the discount
	 */
	public Double getDiscount() {
		return discount;
	}

	/**
	 * Sets the discount.
	 *
	 * @param discount
	 *            the new discount
	 */
	public void setDiscount(Double discount) {
		this.discount = discount;
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see modellayer.Person#toString()
	 */
	@Override
	public String toString() {
		return super.toString() + "\nCVR: " + cvr + "\nRabat: " + discount
				+ "%";
	}
}